package com.freak.wanandroid.base.fragment;

import androidx.fragment.app.Fragment;

import com.freak.wanandroid.base.lifecycle.BaseGenericLifecycleObserver;


public class LifecycleFragment extends Fragment {
    public LifecycleFragment() {
        //不是在onCreate等生命周期方法中注册，而是在构造方法中就注册
        getLifecycle().addObserver(new BaseGenericLifecycleObserver());
    }
}
